package org.meb.lotrlcg.db.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import lombok.Getter;
import lombok.Setter;

import org.hibernate.annotations.ResultCheckStyle;
import org.hibernate.annotations.SQLInsert;
import org.hibernate.annotations.SQLUpdate;

@Getter
@Setter
@Entity
@Table(name = "vw_encounter_set")
@SQLInsert(callable = true, check = ResultCheckStyle.NONE, sql = "call prc_ins_encounter_set_loc(?,?,?,?)")
@SQLUpdate(callable = false, check = ResultCheckStyle.NONE, sql = "call prc_upd_encounter_set_loc(?,?,?,?,?)")
public class EncounterSet {

	private Long crstId;

	@Column(insertable = false, updatable = false)
	private String crstDescription;

	@Column(insertable = false, updatable = false)
	private String crstName;

	@Column(insertable = false, updatable = false)
	private String crstSymbol;

	@Column(insertable = false, updatable = false)
	private String crstTechName;

	@Column(insertable = false, updatable = false)
	private String cycleCode;

	@Column(insertable = false, updatable = false)
	private String cycleDescription;

	@Column(insertable = false, updatable = false)
	private String cycleName;

	@Column(insertable = false, updatable = false)
	private String cycleTechName;

	@Column(insertable = false, updatable = false)
	private boolean localized;
	
	private String name;
	private String techName;
	

	// @OneToMany(mappedBy = "encounterSetBase", cascade = CascadeType.ALL)
	// @OrderBy(value = "sequence")
	// private Set<ScenEnstLink> scenEnstLinkItems;

	// @Version
	private Long version;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;

	public EncounterSet() {
		// scenEnstLinkItems = new HashSet<ScenEnstLink>();
	}

	public EncounterSet(Long id) {
		this.id = id;
	}
}
